package cn.com.huzo.model.entities.tech;

import com.fasterxml.jackson.annotation.JsonFormat;
import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import java.sql.Timestamp;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 物料需求计划主记录实体类
 *
 * @author 吴旭
 */
public class MrpHeaderEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 4269676778069402402L;
    private Long HeaderId;
    private Short BillType;                    // 单据类型 0：提前组料单 1：定版调达 2：副资材
    private Long MoHeaderId;                   // 生产指示书标识
    private Long ProductId;                    // 产品标识
    private String StyleNo;                    // 产品款号
    private String ProductName;                // 品名
    private String ContractNo;                 // 合同号
    private String CustomerName;               // 客户名称
    private Integer TotalQuantity;             // 生产总件数
    private String SaledByName;                // 贸易担当
    private Long PreparedBy;                   // 制表人
    private String PreparedByName;
    private Timestamp PreparedDate;            // 制表日期
    private Long BomHeaderId;                  // 计算用单耗标识
    private String BomDescription;             // 单耗说明
    private String IcLabDipIndication;         // IC色样指示
    private String EmbroideryLaceAndOther;     // 刺绣花边及其他物品单耗
    private String Notes;                      // 注意事项
    private String DesignedByName;             // 设计担当
    private String GradedByName;               // 单耗员
    private String Description;                // 调达表备注
    private Boolean IsIncludeSample;           // 计算成品数是否包含样品数
    private Boolean QuotedFlag;                // 被订单引用标记
    private Boolean PoOverFlag;                // 订单完成标记
    private Boolean PoOpeningRows;             // 订单是否全部引用了调达标记
    private Boolean PoNoticeFlag;              // 采购通知标记

    public Long getHeaderId() {
        return HeaderId;
    }

    public void setHeaderId(Long HeaderId) {
        this.HeaderId = HeaderId;
    }

    public Short getBillType() {
        return BillType;
    }

    public void setBillType(Short BillType) {
        this.BillType = BillType;
    }

    public Long getMoHeaderId() {
        return MoHeaderId;
    }

    public void setMoHeaderId(Long MoHeaderId) {
        this.MoHeaderId = MoHeaderId;
    }

    public Long getProductId() {
        return ProductId;
    }

    public void setProductId(Long ProductId) {
        this.ProductId = ProductId;
    }

    public String getStyleNo() {
        return StyleNo;
    }

    public void setStyleNo(String StyleNo) {
        this.StyleNo = StyleNo;
    }

    public String getProductName() {
        return ProductName;
    }

    public void setProductName(String ProductName) {
        this.ProductName = ProductName;
    }

    public String getContractNo() {
        return ContractNo;
    }

    public void setContractNo(String ContractNo) {
        this.ContractNo = ContractNo;
    }

    public String getCustomerName() {
        return CustomerName;
    }

    public void setCustomerName(String CustomerName) {
        this.CustomerName = CustomerName;
    }

    public Integer getTotalQuantity() {
        return TotalQuantity;
    }

    public void setTotalQuantity(Integer TotalQuantity) {
        this.TotalQuantity = TotalQuantity;
    }

    public String getSaledByName() {
        return SaledByName;
    }

    public void setSaledByName(String SaledByName) {
        this.SaledByName = SaledByName;
    }

    public Long getPreparedBy() {
        return PreparedBy;
    }

    public void setPreparedBy(Long PreparedBy) {
        this.PreparedBy = PreparedBy;
    }

    public String getPreparedByName() {
        return PreparedByName;
    }

    public void setPreparedByName(String PreparedByName) {
        this.PreparedByName = PreparedByName;
    }

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    public Timestamp getPreparedDate() {
        return PreparedDate;
    }

    public void setPreparedDate(Timestamp PreparedDate) {
        this.PreparedDate = PreparedDate;
    }

    public Long getBomHeaderId() {
        return BomHeaderId;
    }

    public void setBomHeaderId(Long BomHeaderId) {
        this.BomHeaderId = BomHeaderId;
    }

    public String getBomDescription() {
        return BomDescription;
    }

    public void setBomDescription(String BomDescription) {
        this.BomDescription = BomDescription;
    }

    public String getIcLabDipIndication() {
        return IcLabDipIndication;
    }

    public void setIcLabDipIndication(String IcLabDipIndication) {
        this.IcLabDipIndication = IcLabDipIndication;
    }

    public String getEmbroideryLaceAndOther() {
        return EmbroideryLaceAndOther;
    }

    public void setEmbroideryLaceAndOther(String EmbroideryLaceAndOther) {
        this.EmbroideryLaceAndOther = EmbroideryLaceAndOther;
    }

    public String getNotes() {
        return Notes;
    }

    public void setNotes(String Notes) {
        this.Notes = Notes;
    }

    public String getDesignedByName() {
        return DesignedByName;
    }

    public void setDesignedByName(String DesignedByName) {
        this.DesignedByName = DesignedByName;
    }

    public String getGradedByName() {
        return GradedByName;
    }

    public void setGradedByName(String GradedByName) {
        this.GradedByName = GradedByName;
    }

    public String getDescription() {
        return Description;
    }

    public void setDescription(String Description) {
        this.Description = Description;
    }

    public Boolean getIsIncludeSample() {
        return IsIncludeSample;
    }

    public void setIsIncludeSample(Boolean IsIncludeSample) {
        this.IsIncludeSample = IsIncludeSample;
    }

    public Boolean getQuotedFlag() {
        return QuotedFlag;
    }

    public void setQuotedFlag(Boolean QuotedFlag) {
        this.QuotedFlag = QuotedFlag;
    }

    public Boolean getPoOverFlag() {
        return PoOverFlag;
    }

    public void setPoOverFlag(Boolean PoOverFlag) {
        this.PoOverFlag = PoOverFlag;
    }

    public Boolean getPoOpeningRows() {
        return PoOpeningRows;
    }

    public void setPoOpeningRows(Boolean PoOpeningRows) {
        this.PoOpeningRows = PoOpeningRows;
    }

    public Boolean getPoNoticeFlag() {
        return PoNoticeFlag;
    }

    public void setPoNoticeFlag(Boolean PoNoticeFlag) {
        this.PoNoticeFlag = PoNoticeFlag;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof MrpHeaderEntity)) {
            return false;
        }

        final MrpHeaderEntity that = (MrpHeaderEntity) o;

        return new EqualsBuilder()
                .append(this.getHeaderId(), that.getHeaderId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + getHeaderId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
